package Server.System;

import java.util.Random;
import java.util.Vector;

import javax.vecmath.Vector3d;

public class RandomMultiBodySystem extends MehrkoerperSystem {
	private double[] rangeMass;
	private double[] rangeRadii;
	private int numberOfBodies; // ohne dem Koerper im Zentrum

	public RandomMultiBodySystem(double[] rangeMass, double[] rangeRadii, int numberOfPlanets, double massCentralBody, Vector3d spaceCircumference, double delta_t) {
		super(spaceCircumference,new Vector<Koerper>(),null,delta_t);
		initCentralBody(massCentralBody);
		this.numberOfBodies = numberOfPlanets;
		
		
	}

	private void initPlanetList() {
		throw new UnsupportedOperationException();
	}

	private double calcRandomMass() {
		double randomMass;
		Random r = new Random();
		int exp1 = Math.getExponent(rangeMass[0]);
		int exp2 = Math.getExponent(rangeMass[1]);
		int rangeExp = exp2 -exp1;
		int randomExp = r.nextInt(rangeExp);
		randomMass = r.nextInt();
		randomMass = Math.pow(randomMass, randomExp);
		return randomMass;
		
	}

	private double calcRandomRadius() {
		throw new UnsupportedOperationException();
	}

	private double calcRandomPosition() {
		throw new UnsupportedOperationException();
	}
	private void initCentralBody(double massCentralBody){
		setCentralBody(new Koerper(1,massCentralBody,new Vector3d(0,0,0)));
	}
}